package com.green.dao.manage.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.green.dao.impl.BaseDaoImpl;
import com.green.dao.manage.PrivilegeRuleDao;
import com.green.model.manage.PrivilegeRule;



/**
 * 地址基础数据
 * 
 */
@Repository("privilegeRuleDao")
public class PrivilegeRuleDaoImpl extends BaseDaoImpl implements PrivilegeRuleDao {

	@Override
	public int insertPrivilegeRule(PrivilegeRule ct) {
		return insert("com.green.dao.manage.PrivilegeRuleDao.insertPrivilegeRule", ct);
	}

	@Override
	public int updatePrivilegeRule(PrivilegeRule ct) {
		return update("com.green.dao.manage.PrivilegeRuleDao.updatePrivilegeRule", ct);
	}

	@Override
	public int deletePrivilegeRule(Map<String, Object> param) {
		return delete("com.green.dao.manage.PrivilegeRuleDao.deletePrivilegeRule", param);
	}

	@Override
	public PrivilegeRule getPrivilegeRuleById(String id) {
		return (PrivilegeRule) super.getSqlSession().selectOne("com.green.dao.manage.PrivilegeRuleDao.getPrivilegeRuleById",id);	
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<PrivilegeRule> getPrivilegeRuleList(Map<String, Object> param) {
		return (List<PrivilegeRule>) selectList("com.green.dao.manage.PrivilegeRuleDao.getPrivilegeRuleList", param);
	}
	
	
}
